A browser's DOM determines how the JavaScript in an HTML document works in that browser. Similarly, Dreamweaver's DOM determines how the JavaScript in extensions works in Dreamweaver.
Dreamweaver's DOM combines a subset of the Netscape Navigator 4.0 DOM with a subset of the World Wide Web Consortium (W3C)'s DOM Level 1. With the incorporation of DOM Level 1, every part of an HTML page has become an object—including tags (which the W3C calls elements), comments, and text.
Objects can be referred to by index (document.forms[3].elements[1]
) or by name (document.myForm.myButton
). Objects with the same name are collapsed into an array. You can access a particular object in the group by index (for example, the first radio button with the name myRadioGroup
in myForm
would be referenced as document.myForm.myRadioGroup[0]
).
The following table gives an overview of the properties, methods, and events supported by each object; these are described in more detail in books such as JavaScript: The Definitive Guide (O'Reilly). Additional details about the W3C properties and methods, which are less thoroughly documented by third parties, follow the table. A bullet (·) marks read-only properties.
Object | Properties | Methods | Events |
---|---|---|---|
|
|
|
|
|
|
None |
None |
|
|
|
|
all tags/elements |
|
|
|
|
In addition to the properties available for all tags:
|
Only those methods available to all tags. |
None |
|
In addition to the properties available for all tags:
|
Only those methods available to all tags. |
None |
|
In addition to the properties available for all tags:
|
Only those methods available to all tags. |
|
|
In addition to the properties available for all tags:
|
In addition to the methods available for all tags:
|
|
|
In addition to the properties available for all tags:
|
In addition to the methods available for all tags:
|
|
|
In addition to the properties available for all tags:
|
In addition to the methods available for all tags:
|
|
|
In addition to the properties available for all tags:
|
In addition to the methods available for all tags:
|
|
|
In addition to the properties available for all tags:
|
Only those methods available to all tags. |
None |
|
Matches Netscape 4 |
Matches Netscape 4 |
None |
|
|
|
None |
|
|
|
None |
|
|
|
None |
While Dreamweaver has a DOM that resembles that of a browser, the property inspectors, floating palettes, and parameters and options dialog boxes associated with extensions are not browsers. For this reason, links (A
tags) are not supported. In addition, while live plugins (set to play
at all times) are supported in the BODY
of extensions, Java applets and ActiveX controls are not.